package com.board.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.board.model.Board;

@Repository("boardDAO")
public class BoardDAOImpl implements BoardDAO {
	@Autowired
	private SqlSession sqlSession;

	public void setSqlSession(SqlSession sqlSession) {
		this.sqlSession = sqlSession;
	}

	@SuppressWarnings("unchecked")
	public List<Board> selectBoardList() {
		return sqlSession.selectList("com.board.dao.board.selectBoard");
	}

	public void insertBoard(Board board) {
		sqlSession.insert("com.board.dao.board.insertBoard", board);
	}
}
